Crossword squares are the elements of a crossword matrix. Each square is either transparent, in which case it appears as black, or contains a letter. A square with a letter may be drawn using any color combination. A square can also display a clue number in its upper left hand corner.
Here are the routines that concern drawing and tracking the mouse. The user can fill and erase squares symmetrically across the puzzle by holding down one of the modifier keys. Squares are drawn using two colors: one for the background, one for the text.
*/
- (BOOL) startTrackingAt: (NXPoint *) point inView: (id) matrix
{
int r, c;
int h, w;
[self paint: matrix];
if ([matrix mouseDownFlags] & (NX_ALTERNATEMASK | NX_SHIFTMASK))
{
[matrix getRow: &r andCol: &c ofCell: self];
[matrix getNumRows: &h numCols: &w];
[[matrix cellAt: (h - r - 1): (w - c - 1)] paint: matrix];